package random.fox.p2p.model;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;
import random.fox.p2p.AppModule;
import random.fox.p2p.interactors.RegisterInteractor;
import random.fox.p2p.presenter.SetInfoPresenter;
import random.fox.p2p.presenter.SetInfoPresenterImpl;
import random.fox.p2p.ui.SetInfoView;
import random.fox.p2p.view.ISetInfoView;

/**
 * 设置信息module
 * Created by wq on 15/3/21.
 */
@Module(
        injects = {
                SetInfoView.class,
        },
        addsTo = AppModule.class
)
public class SetInfoPresenterModule {
    ISetInfoView setInfoView;

    public SetInfoPresenterModule(ISetInfoView setInfoView){
        this.setInfoView = setInfoView;
    }

    @Provides @Singleton
    ISetInfoView provideISetInfoView(){
        return setInfoView;
    }

    @Provides @Singleton
    SetInfoPresenter provideSetInfoPresenter(ISetInfoView setInfoView,RegisterInteractor interactor){
        return new SetInfoPresenterImpl(setInfoView,interactor);
    }
}
